<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>表3</title>
	<link href="../../rs/plugins/bootstrap_tab/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/animate.min.css" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/plugins/fileinput/fileinput.min.css" rel="stylesheet">
	<link href="../../rs/plugins/bootstrap_tab/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
	<style>
		.input-daterange{width: 100%;}
		.m-b-xs{
			padding-right: 0px;
			padding-left: 0px;
		}
	</style>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

	<!-- Panel Other -->
	<div class="ibox float-e-margins">
		<div class="ibox-content form-inline">
			<div class="col-sm-6 m-b-xs">
				<div class="form-group" id="data_5">
					<div class="input-daterange input-group" id="datepicker">
						<input style="height:34px" type="text" class="input-sm form-control" name="start" value="" id="start" />
						<span style="background: #E5E6E7;" class="input-group-addon">到</span>
						<input style="height:34px" type="text" class="input-sm form-control" name="end" value=""  id="end"/>
					</div>
				</div>

			</div>

			<div class="col-sm-2 m-b-xs"></div>
				<div class="col-sm-3 m-b-xs">
					<div class="input-group" id="key">
						<input style="height:34px;" type="text" placeholder="请输入关键词" class="input-sm form-control">
						<span class="input-group-btn">
							<button id="search" style="height:34px;" type="button" class="btn btn-sm "> 查找</button>
						</span>
					</div>
				</div>






			<table id="table"
				   data-toggle="table"
				   data-single-select="true"
				   data-pagination="true"
				   data-advanced-search="true"
				   data-id-table="advancedTable"
				   data-click-to-select="true"
				   data-url="data1.json"
				   data-show-export="true">
				<thead>
				<tr>
					<th data-field="id">ID</th>
					<th data-field="name">Item Name</th>
					<th data-field="price">Item Price</th>
				</tr>
				</thead>
			</table>
			<!-- End Example Card View -->
		</div>



	</div>
</div>
</div>
<!-- End Panel Other -->
</div>

<script src="../../rs/plugins/bootstrap_tab/js/jquery.min.js?v=2.1.4"></script>
<script src="../../rs/plugins/bootstrap_tab/js/bootstrap.min.js?v=3.3.6"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/export/bootstrap-table-export.js"></script>
<script src="../../rs/plugins/bootstrap_tab/js/plugins/export/tableExport.js"></script>




<script type="text/javascript">


	function ajaxRequest(params){
		$.ajax({
			type: "post",
			url: 'data1.json',
			data:'aaa',
			dataType: "json",
			success: function (data){
				params.success(data);
			},
			error: function (XMLHttpRequest, textStatus, errorThrown) {
				//alert(errorThrown);
			}
		});
	}




	//时间设置
	Date.prototype.format = function(format){
		var o = {
			"M+" : this.getMonth()+1, //month
			"d+" : this.getDate(), //day
			"h+" : this.getHours(), //hour
			"m+" : this.getMinutes(), //minute
			"s+" : this.getSeconds(), //cond
			"q+" : Math.floor((this.getMonth()+3)/3), //quarter
			"S" : this.getMilliseconds() //millisecond
		}
		if(/(y+)/.test(format)) {
			format = format.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
		}
		for(var k in o) {
			if(new RegExp("("+ k +")").test(format)) {
				format = format.replace(RegExp.$1, RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));
			}
		}
		return format;
	}

	$(function(){
		var start=(new Date()).format( 'yyyy-MM-01');
		var end=(new Date()).format( 'yyyy-MM-dd');
		$('#start').val(start);
		$('#end').val(end);
	});

	//    日期插件js开始
	$("#data_5 .input-daterange").datepicker({keyboardNavigation: !1, forceParse: !1, autoclose: !0});
	var config = {
		".chosen-select": {},
		".chosen-select-deselect": {allow_single_deselect: !0},
		".chosen-select-no-single": {disable_search_threshold: 10},
		".chosen-select-no-results": {no_results_text: "Oops, nothing found!"},
		".chosen-select-width": {width: "95%"}
	};
	//    日期插件js结束





	var $table = $('#table');
	$("#search").click(function(){
		var time1=$("#data_1 input").val();
		var time2=$("#data_2 input").val();
		var key=$('#key input').val();
		$.ajax({
			type: "post",
			url: 'zt/goods',
			data:"time1="+time1+"time2="+time2+"&key="+key,
			dataType: "json",
			success: function (data){
				ds=data;

			},
			error: function (XMLHttpRequest, textStatus, errorThrown) {
			}
		});
	});

</script>

</body>
</html>
